Skip to content

[Reviewed] [Text-to-Speech] Handle unavailable speech synthesis - #2375

Open
Caf3z1n wants to merge 1 commit into
GDevelopApp:mainfrom
Caf3z1n:fix/text-to-speech-unavailable
Open

Caf3z1n wants to merge 1 commit into
GDevelopApp:mainfrom
Caf3z1n:fix/text-to-speech-unavailable

Conversation

@Caf3z1n

@Caf3z1n Caf3z1n commented Nov 25, 2026

Copy link
Copy Markdown

Description

Fixes #2209.

The first-scene callback tries to preload voices even when the browser does not expose speechSynthesis. The Stop speaking action also assumes that the API is available. Both paths now skip speech synthesis when it is unavailable, allowing the game to continue loading. The existing Speak action already checks for support.

How to test

Open game.json from the attached ZIP in GDevelop 5.6.287 and run its two gameplay tests. The first simulates the missing browser API and exercises initialization, Speak, and Stop speaking. The second verifies that voice preloading, speech, and cancellation still work with a controlled speech API. The first test fails on the current extension and both pass with the fix. The extension repository build and automated checks also passed.

AI usage

  • I used an AI to generate some part of the code.

Codex helped investigate the issue and generated the patch and regression project. The tests were executed locally in GDevelop Desktop. The unavailable-API condition was simulated.

Example project

gdevelop-2209-text-to-speech-example.zip

@Caf3z1n
Caf3z1n requested a review from a team as a code owner November 25, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Text to speech] ReferenceError: speechSynthesis is not defined

1 participant